package com.sitanyun.merchant.guide.frament.view.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.sitanyun.merchant.guide.R;
import com.sitanyun.merchant.guide.base.BaseActivity;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * 提现成功
 */
public class SuccesActivity extends BaseActivity {


    @BindView(R.id.su_img)
    ImageView suImg;
    @BindView(R.id.su_text)
    TextView suText;
    @BindView(R.id.sbm_withdrawal)
    TextView sbmWithdrawal;
    @BindView(R.id.message)
    TextView message;
    @BindView(R.id.tv_return)
    ImageView tvReturn;

    @Override
    public int getLayoutId() {
        return R.layout.activity_succes;
    }

    @Override
    public void initData(Bundle savedInstanceState) {
        setFindViewById(true);
        tvReturn.setVisibility(View.GONE);
        if (getIntent().getStringExtra("types").equals("1")) {
            setTitleStr("提现成功");
            suText.setText("提现成功待发放");
            message.setText("1个工作日到账，请到钱包查看");
            Glide.with(SuccesActivity.this).load(R.mipmap.cgsucces).into(suImg);
        } else {
            message.setText("因网络或未知原因提现失败，请稍后再试");
            setTitleStr("提现失败");
            Glide.with(SuccesActivity.this).load(R.mipmap.sbfail).into(suImg);
            suText.setText("提现失败");
        }
    }

    @Override
    public void initView() {

    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // TODO: add setContentView(...) invocation
        ButterKnife.bind(this);
    }
       //返回
    @OnClick(R.id.sbm_withdrawal)
    public void onViewClicked() {
        finish();
    }
}
